package com.unieagle.exam.widget;

import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.widget.CheckBox;

import com.unieagle.exam.utils.UIUtils;

public class SmallCheckBox extends CheckBox
{
	 private ScalingDrawable checkImg;
	 
	 public SmallCheckBox(Context ctx)
	 {
		 super(ctx);
		 setBackgroundColor(Color.TRANSPARENT);
		 Drawable origImg = UIUtils.getDefaultCheckBoxDrawable(ctx);
		 checkImg = new ScalingDrawable(origImg, 1);
		 setButtonDrawable(checkImg);
	 }
	 
	 public void setHeight(int height)
	 {
		 super.setHeight(height);
		 checkImg.setScale(0.48f);
		 setPadding(UIUtils.dip2px(getContext(), 15), 0, 0, 0);
	 }
	 
}
